<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>查看设备详情</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$('#videovolume').slider({
			formatter: function(value) {
				return value;
			}
		});
			$('#audiovolume').slider({
				formatter: function(value) {
					return value;
				}
			});
			$('#backlight').slider({
				formatter: function(value) {
					return value;
				}
			});
			$('#sleeplightlevel1').slider({
				formatter: function(value) {
					return value;
				}
			});
			$('#sleeplightlevel2').slider({
				formatter: function(value) {
					return value;
				}
			});
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('<spring:message code="common.subbmiting"/>');
                    timeVali($("#btnSubmit"));
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
		
	</script>
    <style>
        .input-mini{  width: 60px;  }  .select2-container{  width: 120px;  }  .form-horizontal .control-group {  margin-bottom: 8px;  display: block;  height: 35px;  line-height: 35px;  width: 100%;  float: left;  }  .form-horizontal .control-label{  padding-top: 10px;  }  #videovolumeSlider {  margin-left: 10px;  }  #audiovolumeSlider {  margin-left: 10px;  }  #backlightSlider {  margin-left: 10px;  }  #sleeplightlevel1Slider {  margin-left: 10px;  }  #sleeplightlevel2Slider {  margin-left: 10px;  }  #videovolumeSlider .slider-selection {  background: #BABABA;  }  #audiovolumeSlider .slider-selection {  background: #BABABA;  }  #backlightSlider .slider-selection {  background: #BABABA;  }  #sleeplightlevel1Slider .slider-selection {  background: #BABABA;  }  #sleeplightlevel2Slider .slider-selection {  background: #BABABA;  }
    </style>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active">
			<a href="javascript:void(0);">
				<spring:message code="device.monitor"/>
			</a>
		</li>
	</ul>
	<form:form id="inputForm" modelAttribute="eleEquipment" action="${ctx}/equipment/eleEquipment/config" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>
		<div class="control-group">
			<label class="control-label"><spring:message code="video.volume"/>：</label>
			<div class="controls">
				<c:if test="${not empty eleEquipment.videovolume}">
					<input id="videovolume" name="videovolume" data-slider-id='videovolumeSlider' type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="${eleEquipment.videovolume}"/>
				</c:if>
				<c:if test="${empty eleEquipment.videovolume}">
					<input id="videovolume" name="videovolume" data-slider-id='videovolumeSlider' type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="50"/>
				</c:if>
			</div>
		</div>

		<div class="control-group">
			<label class="control-label"><spring:message code="station.volume"/>：</label>
			<div class="controls">
			<c:if test="${not empty eleEquipment.audiovolume}">
				<input id="audiovolume" name="audiovolume" data-slider-id='audiovolumeSlider' type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="${eleEquipment.audiovolume}"/>
			</c:if>
			<c:if test="${empty eleEquipment.audiovolume}">
				<input id="audiovolume" name="audiovolume" data-slider-id='audiovolumeSlider' type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="80"/>
			</c:if>
			</div>
		</div>
		<%--<div class="control-group">
			<label class="control-label">Ip类型：</label>
			<div class="controls">
                <form:select path="ipmode" >
                    <form:options items="${fns:getDictList('ipmode')}" itemLabel="label" itemValue="value" htmlEscape="false" class="input-small" />
                </form:select>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">Ip地址：</label>
			<div class="controls">
				<form:input path="ipaddress" htmlEscape="false" maxlength="50" class="required input-small"/>
			</div>
		</div>--%>
		<%--<div class="control-group">
			<label class="control-label">服务器地址：</label>
			<div class="controls">
				<form:input path="serverIpaddress" htmlEscape="false" maxlength="50" class="required input-mini"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">服务器端口：</label>
			<div class="controls">
				<form:input path="serverPort" htmlEscape="false" maxlength="50" class="required input-mini"/>
			</div>
		</div>--%>
		<div class="control-group">
			<label class="control-label"><spring:message code="backlight.brightness"/>：</label>
			<div class="controls">
			<c:if test="${not empty eleEquipment.backlight}">
				<input id="backlight" name="backlight" data-slider-id='backlightSlider' type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="${eleEquipment.backlight}"/>
			</c:if>
			<c:if test="${empty eleEquipment.backlight}">
				<input id="backlight" name="backlight" data-slider-id='backlightSlider' type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="80"/>
			</c:if>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">1<spring:message code="sleep.brightness"/>：</label>
			<div class="controls">
			<c:if test="${not empty eleEquipment.sleeplightlevel1}">
				<input id="sleeplightlevel1" name="sleeplightlevel1" data-slider-id='sleeplightlevel1Slider' type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="${eleEquipment.sleeplightlevel1}"/>
			</c:if>
			<c:if test="${empty eleEquipment.sleeplightlevel1}">
				<input id="sleeplightlevel1" name="sleeplightlevel1" data-slider-id='sleeplightlevel1Slider' type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="15"/>
			</c:if>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">1<spring:message code="dormancy.time"/>：</label>
			<div class="controls">
			<c:if test="${not empty eleEquipment.hangupthreshold1}">
				<form:input path="hangupthreshold1" htmlEscape="false" maxlength="50" class="required input-mini digits" value="${eleEquipment.hangupthreshold1}"/><spring:message code='seconds'/>
			</c:if>
			<c:if test="${empty eleEquipment.hangupthreshold1}">
				<form:input path="hangupthreshold1" htmlEscape="false" maxlength="50" class="required input-mini digits" value="90"/><spring:message code='seconds'/>
			</c:if>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">2<spring:message code="sleep.brightness"/>：</label>
			<div class="controls">
			<c:if test="${not empty eleEquipment.sleeplightlevel2}">
				<input id="sleeplightlevel2" name="sleeplightlevel2" data-slider-id='sleeplightlevel2Slider' type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="${eleEquipment.sleeplightlevel2}"/>
			</c:if>
			<c:if test="${empty eleEquipment.sleeplightlevel2}">
				<input id="sleeplightlevel2" name="sleeplightlevel2" data-slider-id='sleeplightlevel2Slider' type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="0"/>
			</c:if>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">2<spring:message code="dormancy.time"/>：</label>
			<div class="controls">
			<c:if test="${not empty eleEquipment.hangupthreshold2}">
				<form:input path="hangupthreshold2" htmlEscape="false" maxlength="50" class="required input-mini digits" value="${eleEquipment.hangupthreshold2}"/><spring:message code='seconds'/>
			</c:if>
			<c:if test="${empty eleEquipment.hangupthreshold2}">
				<form:input path="hangupthreshold2" htmlEscape="false" maxlength="50" class="required input-mini digits" value="1200"/><spring:message code='seconds'/>
			</c:if>
			</div>
		</div>
		<!-- 
		<div class="control-group">
			<label class="control-label"><spring:message code="manned"/>：</label>
			<div class="controls">
			<c:if test="${not empty eleEquipment.personlimit}">
				<form:input path="personlimit" htmlEscape="false" maxlength="50" class="required input-mini digits" value="${eleEquipment.personlimit}"/>
			</c:if>
			<c:if test="${empty eleEquipment.personlimit}">
				<form:input path="personlimit" htmlEscape="false" maxlength="50" class="required input-mini digits" value="13"/>
			
			</c:if>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label"><spring:message code="load"/>：</label>
			<div class="controls">
			<c:if test="${not empty eleEquipment.kglimit}">
				<form:input path="kglimit" htmlEscape="false" maxlength="50" class="required input-mini digits" value="${eleEquipment.kglimit}"/>KG
			</c:if>
			<c:if test="${empty eleEquipment.kglimit}">
				<form:input path="kglimit" htmlEscape="false" maxlength="50" class="required input-mini digits" value="1050"/>KG
			</c:if>
			</div>
		</div>
		 -->
		<div class="control-group">
			<label class="control-label"><spring:message code="time.zone"/>：</label>
			<div class="controls">
				<form:select path="timezone" >
					<form:options items="${fns:getDictList('timezone')}" itemLabel="label" itemValue="value" htmlEscape="false" class="input-small"/>
				</form:select>
			</div>
		</div>
		<c:if test="${language == 'zh'}">
			<div class="control-group">
				<label class="control-label"><spring:message code="language"/>：</label>
				<div class="controls">
					<form:select path="language" >
						<form:options items="${fns:getDictList('language')}" itemLabel="label" itemValue="value" htmlEscape="false" class="input-small"/>
					</form:select>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label"><spring:message code="device.orientation"/>：</label>
				<div class="controls">
					<label class="lbl">${fns:getDictLabel(eleEquipment.orientation, "orientation" ,"")}</label>
				</div>
			</div>

			<div class="control-group">
				<label class="control-label"><spring:message code="full.screen"/>：</label>
				<div class="controls">
					<form:radiobuttons path="fullscreen" items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label"><spring:message code="Title.Explicit"/>：</label>
				<div class="controls">
					<form:radiobuttons path="titledisplay" items="${fns:getDictList('display')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label"><spring:message code="Time.and.date.are.hidden"/>：</label>
				<div class="controls">
					<form:radiobuttons path="timedisplay" items="${fns:getDictList('display')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label"><spring:message code="scrolling.text.hiding"/>：</label>
				<div class="controls">
					<form:radiobuttons path="subtitledisplay" items="${fns:getDictList('display')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</div>
			</div>
		</c:if>
		<c:if test="${language == 'en'}">
			<div class="control-group">
				<label class="control-label"><spring:message code="language"/>：</label>
				<div class="controls">
					<form:select path="language" >
						<form:options items="${fns:getDictList('language')}" itemLabel="enlabel" itemValue="value" htmlEscape="false" class="input-small"/>
					</form:select>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label"><spring:message code="device.orientation"/>：</label>
				<div class="controls">
					<label class="lbl">${fns:getEnDictLabel(eleEquipment.orientation, "orientation" ,"")}</label>
				</div>
			</div>

			<div class="control-group">
				<label class="control-label"><spring:message code="full.screen"/>：</label>
				<div class="controls">
					<form:radiobuttons path="fullscreen" items="${fns:getDictList('yes_no')}" itemLabel="enlabel" itemValue="value" htmlEscape="false"/>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label"><spring:message code="Title.Explicit"/>：</label>
				<div class="controls">
					<form:radiobuttons path="titledisplay" items="${fns:getDictList('display')}" itemLabel="enlabel" itemValue="value" htmlEscape="false"/>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label"><spring:message code="Time.and.date.are.hidden"/>：</label>
				<div class="controls">
					<form:radiobuttons path="timedisplay" items="${fns:getDictList('display')}" itemLabel="enlabel" itemValue="value" htmlEscape="false"/>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label"><spring:message code="scrolling.text.hiding"/>：</label>
				<div class="controls">
					<form:radiobuttons path="subtitledisplay" items="${fns:getDictList('display')}" itemLabel="enlabel" itemValue="value" htmlEscape="false"/>
				</div>
			</div>
		</c:if>

		<div class="control-group" style="display: none;">
			<label class="control-label"><spring:message code="Picture.interval"/>：</label>
			<div class="controls">
                <form:input path="imageinterval" htmlEscape="false" maxlength="50" class="required input-mini digits"/><spring:message code='seconds'/>
			</div>
		</div>
		
		<%--<div class="control-group" >
			<label class="control-label"><spring:message code="Date.value"/><spring:message code="Time.value"/>：</label>
			<div class="controls">
				<form:input path="devicetime" htmlEscape="false" maxlength="200" class="input-big Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});" />
			</div>
		</div>--%>
		<!-- 
		<div class="control-group">
			<label class="control-label"><spring:message code="Time.value"/>：</label>
			<div class="controls">
				<form:input path="timeformat" htmlEscape="false" maxlength="50" class="input-small Wdate" onclick="WdatePicker({dateFmt:'HH:mm:ss',isShowClear:false});" />
			</div>
		</div>
		 -->
		<div class="control-group">
			<label class="control-label"><spring:message code='common.resolution'/>：</label>
			<div class="controls">
				<label class="lbl">${eleEquipment.width} X ${eleEquipment.height}</label>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label"><spring:message code='monitor.show.version'/>：</label>
			<div class="controls">
				<label class="lbl">${eleEquipment.show}</label>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label"><spring:message code='monitor.set.version'/>：</label>
			<div class="controls">
				<label class="lbl">${eleEquipment.set}</label>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label"><spring:message code='monitor.mcu.version'/>：</label>
			<div class="controls">
				<label class="lbl">${eleEquipment.mcu}</label>
			</div>
		</div>
		<!-- 
		<c:forEach items="${params}" var="eleMonitorParam">
		<div class="control-group">
		
		<label class="control-label">${eleMonitorParam.title}：</label>
			<div class="controls">
				<label class="lbl">${eleMonitorParam.threshold}</label>
			</div>
		
		</div>
		</c:forEach>
		 -->
        <div class="control-group" style="width:100%;">
            <shiro:hasPermission name="equipment:eleEquipment:edit">
                <input id="btnSubmit" class="btn btn-primary" type="submit" value="<spring:message code='common.save'/>" style="margin-left: 100px;"/>&nbsp;
            </shiro:hasPermission>
        </div>
	</form:form>
</body>
</html>